package com.controller.setting;

import com.comm.R;
import com.entity.InspectionItem;
import io.swagger.annotations.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
@RequestMapping(value = "/SystemInspection")
@Controller
@Api(value = "项目检查费",tags = "项目检查费接口")
@ApiResponses({
        @ApiResponse(code=200,message="请求成功"),
        @ApiResponse(code=404,message="找不到页面"),
        @ApiResponse(code=403,message="请求禁止"),
        @ApiResponse(code=401,message="请求未授权"),
        @ApiResponse(code=500,message="后台服务错误")})
//这个类项目检查费
public class SystemInspection {
// 1.3.1：条件查找项目检查费
@ResponseBody
@RequestMapping(value ="/fundInspection",method = RequestMethod.GET)
@ApiOperation(value = "条件查找项目检查费 的接口",notes = "条件查找项目检查费",httpMethod = "post", response = String.class)
@ApiImplicitParam(name = "itemname",value = "项目名称",required = true,dataType = "String",paramType = "query")
public  R fundInspection(@RequestParam(name = "itemname")String  itemname){
    R r = new R();
    r.setCode(200);
    r.setMsg("你好棒，查到了");
    String data = "{\n" +
            " \"data\": [{\n" +
            "   \"id\": 100001,\n" +
            "   \"itemname\": \"澳门首家\",\n" +
            "   \"itemtype\": \"拍片\",\n" +
            "   \"itemprice\": 20,\n" +
            "    \"itemcost\":10,\n" +
            "    \"item_nuit\":\"国信安赵公子\"\n" +
            "  }\n" +
            " ]}";
    r.setData(data);
    return r;
}
    //1.3.2：查找项目检查费
    @ResponseBody
    @RequestMapping(value ="/fundInspections",method = RequestMethod.GET)
    @ApiOperation(value = "查找项目检查费接口",notes = "查找项目检查费",httpMethod = "post", response = String.class)
    public  R fundInspections(){
        R r = new R();
        r.setCode(200);
        r.setMsg("你好棒，查到了");
        String data = "{\n" +
                " \"data\": [{\n" +
                "   \"id\": 100001,\n" +
                "   \"itemname\": \"澳门首家\",\n" +
                "   \"itemtype\": \"拍片\",\n" +
                "   \"itemprice\": 20,\n" +
                "    \"itemcost\":10,\n" +
                "    \"item_nuit\":\"国信安赵公子\"\n" +
                "  },{\n" +
                "   \"id\": 100002,\n" +
                "   \"itemname\": \"澳门二家家\",\n" +
                "   \"itemtype\": \"拍片片\",\n" +
                "   \"itemprice\": 20,\n" +
                "    \"itemcost\":10,\n" +
                "    \"item_nuit\":\"国信安赵公子\"},\n" +
                "{\n" +
                "   \"id\": 100003,\n" +
                "   \"itemname\": \"澳门首家\",\n" +
                "   \"itemtype\": \"拍片\",\n" +
                "   \"itemprice\": 20,\n" +
                "    \"itemcost\":10,\n" +
                "    \"item_nuit\":\"国信安赵公子\"}\n" +
                " ]}";
        r.setData(data);
        return r;
    }
    //   1.3.3：添加项目检查费的接口：
    @ResponseBody
    @RequestMapping(value ="/addInspection",method = RequestMethod.POST)
    @ApiOperation(value = "添加处方附加费的接口",notes = "添加处方附加费",httpMethod = "post", response = String.class)
    public  R addInspection(@RequestBody @ApiParam(name = "实体类",value = "vo") InspectionItem vo){
        R r = new R();
        r.setCode(200);
        r.setMsg("你好棒，添加成功");
        String data = "";
        r.setData(data);
        return r;
    }
    // 1.3.4：编辑项目检查费的接口：
    @ResponseBody
    @RequestMapping(value ="/editInspection",method = RequestMethod.POST)
    @ApiOperation(value = "编辑项目检查费的接口",notes = "编辑项目检查费的",httpMethod = "post", response = String.class)
    public  R editInspection(@RequestBody @ApiParam(name = "实体类",value = "vo") InspectionItem vo){
        R r = new R();
        r.setCode(200);
        r.setMsg("你好棒，编辑成功");
        String data = "";
        r.setData(data);
        return r;
    }
    // 1.3.5：删除项目检查费的接口：
    @ResponseBody
    @RequestMapping(value ="/deltInspection",method = RequestMethod.POST)
    @ApiOperation(value = "删除项目检查费的接口",notes = "项目检查费",httpMethod = "post", response = String.class)
    @ApiImplicitParam(name = "id",value = "主键id",required = true,dataType = "int",paramType = "query")
    public  R delInspection(@RequestParam(name = "id")Integer id){
        R r = new R();
        r.setCode(200);
        r.setMsg("你好棒，删除成功");
        String data ="";
        r.setData(data);
        return r;
    }
//    1.3.6：添加项目检查费跟编辑项目检查费部分参数接口（对应动态获取参数，对应项目字典表）：
@ResponseBody
@RequestMapping(value ="/fundprojectss",method = RequestMethod.GET)
@ApiOperation(value = "查找项目字典表接口",notes = "查找项目字典表",httpMethod = "post", response = String.class)
public  R fundprojects(){
    R r = new R();
    r.setCode(200);
    r.setMsg("你好棒，查到了");
    String data = "[{\n" +
            "   \"id\": 100001,\n" +
            "   \"projectName\": \"澳门首家\",\n" +
            "   \"projectSource\": \"自建\",\n" +
            "   \"projectRemark\": \"没有备注\"\n" +
            "  },{\n" +
            "   \"id\": 100001,\n" +
            "   \"projectName\": \"打王者\",\n" +
            "   \"projectSource\": \"自建\",\n" +
            "   \"projectRemark\": \"没有备注\"\n" +
            "  },{\n" +
            "   \"id\": 100001,\n" +
            "   \"projectName\": \"打豆豆\",\n" +
            "   \"projectSource\": \"自建\",\n" +
            "   \"projectRemark\": \"没有备注\"\n" +
            "  }\n" +
            " ]}";
    r.setData(data);
    return r;
}

}

